<?php
/**
 * The template used to display Author Archive pages
 *
 * @package dkret3
 * @since 3.6
 */

get_header() ?>

    <div id="container">

        <?php /* dkret3 Hook */ do_action( 'dkret_before_container' ); ?>    

        <div id="content" role="main">

            <?php /* dkret3 Hook */ do_action( 'dkret_before_content' ); ?>

            <?php the_post() ?>

            <h2 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'dkret' ), "<a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h2>

            <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their decscription show a bio on their entries  ?>

                <div id="entry-author-info">
                
                    <div id="author-avatar">
                        <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'dkret_author_bio_avatar_size', 60 ) ); ?>
                    </div><!-- #author-avatar 	-->
                    
                    <div id="author-description">
                        <h2><?php printf( __( 'About %s', 'dkret' ), get_the_author() ); ?></h2>
                        <?php the_author_meta( 'description' ); ?>
                    </div><!-- #author-description	-->
                    
                </div><!-- .entry-author-info -->
                
            <?php endif; ?>

            <?php rewind_posts(); ?>

            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

                <div id="post-<?php the_ID() ?>" <?php post_class() ?>>

                    <?php /* dkret3 Hook */ do_action( 'dkret_before_entry' ); ?>

                    <?php if ( get_dkret_option( 'summary' ) ) : //Display Excerpts if Option is set ?>

                        <div class="entry-summary">
                        
                            <?php the_excerpt( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'dkret' ) ); ?>

                        </div><!-- .entry-summary -->

                    <?php else : ?>

                        <div class="entry-content">

                            <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'dkret' ) ); ?>

                            <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'dkret' ), 'after' => '</div>' ) ); ?>

                        </div><!-- .entry-content -->

                    <?php endif; ?>

                    <?php /* dkret3 Hook */ do_action( 'dkret_after_entry' ); ?>
            
                </div><!-- #post-ID -->
                    
            <?php endwhile; ?>

            <?php else: ?>

                <p class="no-data">
                    <?php _e( 'Sorry, there are no posts in this archive.', 'dkret' ); ?>
                </p><!-- .no-data -->

            <?php endif; ?>

            <?php /* dkret3 Hook */ do_action( 'dkret_after_content' ); ?>

        </div>

        <?php /* dkret3 Hook */ do_action( 'dkret_after_container' ); ?>

    </div>

<?php get_sidebar() ?>
<?php get_footer() ?>